<%@ Page Title="YoProgramo.NET" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IComment>" %>
<%@ Import Namespace="YoProgramo.Domain.Core.Interfaces"%>
<%@ Import Namespace="Microsoft.Practices.ServiceLocation"%>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">

<%if (Model != null){ %>

    <h2>Editar Comentario</h2>

    <%= Html.ValidationSummary("Create was unsuccessful. Please correct the errors and try again.") %>

    <% using (Html.BeginForm()) {%>    
    
    <% = Html.AntiForgeryToken() %>       
        <%= Html.Hidden("comment.Id", ((YoProgramo.Domain.Core.Entities.Comment)Model).Id)%>
        <p>                                      
            <%= 
              Html.TextArea("comment.TextBody", ((YoProgramo.Domain.Core.Entities.Comment)Model).TextBody, new { style = "width:100%; height:330px;" })
              %>
            <%= Html.ValidationMessage("comment.TextBody", "*")%>
            <div class="wmd-preview"></div>
<script type="text/javascript">
  // to set WMD's options programatically, define a "wmd_options" object with whatever settings
  // you want to override.  Here are the defaults:
  wmd_options = {
    // format sent to the server.  Use "Markdown" to return the markdown source.
    output: "Markdown",

    // line wrapping length for lists, blockquotes, etc.
    //lineLength: 40,

    // toolbar buttons.  Undo and redo get appended automatically.
    buttons: "bold italic | link blockquote code image | ol ul heading hr",

    // option to automatically add WMD to the first textarea found.  See apiExample.html for usage.
    autostart: true
  };
</script>
<script src="../../Scripts/wmd/wmd.js" type="text/javascript"></script>                        
        </p>
        <p>
            <input type="submit" value="<%= Resources.Strings.BottomFormSubmit %>" />
        </p>
    <% } %>
    
<%}%>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceBarra" runat="server">
</asp:Content>
